package com.kkb.mybatis.utils;

import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;

import org.dom4j.Document;
import java.io.InputStream;

/**
 * User: zsl
 * Date: 2019/10/1011:13
 * Description:
 */
public class DocumentUtils {

    public static Document readDocument(InputStream inputStream){


        try {
            SAXReader saxReader = new SAXReader();
            Document document = saxReader.read(inputStream);
            return  document;
        } catch (DocumentException e) {
            e.printStackTrace();
        }
        return null;
    }
}
